fix(dashboard): correct webhook example payload to match v2 schema#324
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
LGTM, trivial fix to a static example payload string.
Extended reasoning...
Overview
This PR updates a single static string constant (WEBHOOK_EXAMPLE_PAYLOAD) in src/features/dashboard/settings/webhooks/constants.ts to match the actual v2 webhook payload schema emitted by the backend. It bumps the version field from v1 to v2, switches all field names to snake_case, removes the unused eventData field, and adds event_category and event_label. Also drops a trailing whitespace from a comment.
Security risks
None. This is purely a display-only example string shown in the webhook add/edit dialog. There is no execution path, no user input, no auth or crypto involved.
Level of scrutiny
Minimal. This is a documentation-style change to a hardcoded example. Worst case is that the example is slightly inaccurate, which is exactly what this PR is fixing.
Other factors
The diff is contained to one file, ~12 line change, and the intent is clearly stated in the PR description. No bugs were found by the bug hunter.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8c54d5e98
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "event_label": "create", | ||
| "sandbox_id": "<SANDBOX_ID>", |
There was a problem hiding this comment.
Preserve event_data in the v2 example
For v2 deliveries that include sandbox metadata or execution details, the webhook schema exposes that data under snake_case event_data; this update removes the old eventData field but never adds its v2 replacement. Users copying this example for payload validation or handler typings will reject or ignore real deliveries that contain event data, especially paused/killed events and sandboxes with metadata.
Useful? React with 👍 / 👎.
Summary
v2, switched all field names to snake_case, removed the non-existenteventDatafield, and added the newevent_categoryandevent_labelfields.Test plan